<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
//问题表
class CreateSubjectsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('subjects', function (Blueprint $table) {
            $table->increments('id');
            $table->timestamps();
            $table->integer('order')->default(1);//排序
            $table->string('subject',500)->nullable();//题目
            $table->tinyInteger('sort')->default(0);//题目分类
            $table->tinyInteger('describe')->default(0);//题目形容id
            $table->string('answer_1');//答案1
            $table->string('answer_2');//答案2
            $table->string('result_1',1);//答案1指向结论
            $table->string('result_2',1);//答案2指向结论
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('subjects');
    }
}
